/*
 * @(#)KeywordsRepository.java $version 2012. 2. 6.
 *
 */

package com.mywep.myalimi.repository.keyword;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.mywep.myalimi.model.Keyword;

import com.nhncorp.lucy.spring.core.util.ExtendedMap;

/**
 * @author 한지웅
 */
public class KeywordRepository extends SqlMapClientDaoSupport {

	public int countByExample(ExtendedMap param) {
		return (Integer)getSqlMapClientTemplate().queryForObject("keyword.countByExample", param);
	}

	@SuppressWarnings("unchecked")
	public List<Keyword> selectByExample(ExtendedMap param) {
		return getSqlMapClientTemplate().queryForList("keyword.selectByExample", param);
	}

	public Keyword selectByPrimaryKey(Keyword param) {
		return (Keyword)getSqlMapClientTemplate().queryForObject("keyword.selectByPrimaryKey", param);
	}

	public Integer insert(Keyword param) {
		return (Integer)getSqlMapClientTemplate().insert("keyword.insert", param);
	}

	public Integer updatePrimaryKey(Keyword param) {
		return (Integer)getSqlMapClientTemplate().update("keyword.updatePrimaryKey", param);
	}


	public Integer delete(Keyword param) {
		return (Integer)getSqlMapClientTemplate().delete("keyword.deleteByPrimaryKey", param);
	}
}
